home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d13 / ques22.arc / QUES22.DOC < prev    next >
Text File  |  1991-02-11  |  11KB  |  250 lines

  1.        
  2.        
  3.        
  4.        QUES                                                      Ver 2.2
  5.        -----------------------------------------------------------------
  6.        Logan M. Lewis                            Copyright (c) 1987-1991
  7.                                                        February 10, 1991
  8.        
  9.        Purpose:
  10.        
  11.            QUES is a batch file enhancement program that gets a YES, NO, 
  12.            or numeric response from the user and sets ERRORLEVEL 
  13.            accordingly.  The program can select a default response after 
  14.            a user settable time interval.  The following are the calling 
  15.            parameters for the program.
  16.        
  17.        Syntax:
  18.        
  19.            QUES [/a][/b][/d][/f][/l][/m][/n][/r][/t][/u][/y]
  20.        
  21.        Parameters:
  22.        
  23.            /a   Display user response
  24.                 Causes the program to display "Yes" or "No" on the 
  25.                 screen to verify the users response.  If the /r 
  26.                 parameter is used, a response in the numeric range 0-9 
  27.                 is displayed.
  28.                 
  29.            /b   Background Text Color
  30.                 Sets the background color for all text output by QUES.  
  31.                 Color values range from 0-7 as follows:
  32.                 0 - Black
  33.                 1 - Blue 
  34.                 2 - Green
  35.                 3 - Cyan 
  36.                 4 - Red  
  37.                 5 - Magenta
  38.                 6 - Brown
  39.                 7 - White
  40.                 
  41.                 EXAMPLE:  /b1 (Set text background to Blue)
  42.                 
  43.            /d   Default reply
  44.                 Provides a default reply (YES or NO) to be assumed if 
  45.                 the user responds with a CR (Enter) or the timer is used 
  46.                 and runs out.  If the numeric response switch (/r) is 
  47.                 set, the default reply will be between 1 and 9.
  48.                 
  49.                 EXAMPLE:  /dy (Set the default reply to Yes)
  50.                           /d5 (Set the default reply to 5)
  51.                 
  52.        
  53.        
  54.        
  55.        
  56.            /f   Foreground Text Color
  57.                 Sets the foreground color for all text output by QUES.  
  58.                 Color values range from 0-15 as follows:
  59.                 0 - Black                8 - Gray      
  60.                 1 - Blue                 9 - Hi Blue   
  61.                 2 - Green               10 - Hi Green  
  62.                 3 - Cyan                11 - Hi Cyan   
  63.                 4 - Red                 12 - Hi Red    
  64.                 5 - Magenta             13 - Hi Magenta
  65.                 6 - Brown               14 - Hi Yellow 
  66.                 7 - White               15 - Hi White  
  67.                 
  68.                 EXAMPLE:  /f10 (Set text color to Hi Green)
  69.                 
  70.            /l   Line Feed Count
  71.                 The user supplied text (/u) is displayed right where the 
  72.                 cursor is sitting when the program starts.  If you want 
  73.                 some additional line feeds, this parameter will cause 
  74.                 from 1 to 5 to be inserted.
  75.                 
  76.                 EXAMPLE:  /l3 (inserts 3 line feeds--/l alone inserts 1)
  77.                 
  78.            /m   Menu Response List
  79.                 Allows the user to develop simple menus of up to nine 
  80.                 entries using any alphabetic or numeric character as the 
  81.                 menu entry selector.  Case is ignored.  Defaults (/d) 
  82.                 may be used but must be a value contained in the list.  
  83.                 Parameters /n, /r, and /y are ignored if /m is used.  
  84.                 Characters in the list assume an ERRORLEVEL equal to the 
  85.                 number of their position in the list.
  86.                 
  87.                 EXAMPLE:  /m12XY (a Response of  1  yields ERRORLEVEL  1
  88.                                                  2                     2
  89.                                                  X                     3
  90.                                                  Y                     4
  91.                 
  92.            /n   ERRORLEVEL Value for a NO Response
  93.                 Allows the user to set the ERRORLEVEL for a NO response 
  94.                 to any value between 0 and 98.  However, the value 
  95.                 cannot be set the same as the YES value.  If not set, NO 
  96.                 defaults to ERRORLEVEL=90.  This parameter is disabled 
  97.                 if /r is used.
  98.                 
  99.                 EXAMPLE:  /n45 (Set the value for NO to 45)
  100.                 
  101.            /r   Numeric Responses
  102.                 The program accepts numeric responses in the range 0-9.  
  103.                 /n and /y parameters are disabled.  If used in 
  104.                 conjunction with /d, default replies must be numeric in 
  105.                 the range 0-9.
  106.                 
  107.        
  108.        
  109.        
  110.        
  111.            /t   Countdown timer setting (0-60 seconds)
  112.                 If the timer value runs out before the user replies, the 
  113.                 program will automatically use the default reply value.  
  114.                 If no default reply is specified, the timer value is 
  115.                 ignored and the user must reply.
  116.                 
  117.                 EXAMPLE:  /t15 (After 15 seconds use the default reply)
  118.                 
  119.            /u   User text string to display before reply
  120.                 The text string following the "u" will be written to the 
  121.                 screen before the user's reply.
  122.                 
  123.                 EXAMPLE:  /uPlease enter your response (Y or n) -
  124.                 
  125.            /y   ERRORLEVEL value for a YES response
  126.                 Allows the user to set the ERRORLEVEL for a YES response 
  127.                 to any value between 0 and 89.  However, the value 
  128.                 cannot be set the same as the NO value.  If not set, YES 
  129.                 defaults to ERRORLEVEL=95.  This parameter is disabled 
  130.                 if /r is used.
  131.                 
  132.                 EXAMPLE:  /y50 (Set the value for YES to 50)
  133.                 
  134.        
  135.        Entering QUES without parameters causes a brief documentation 
  136.        screen to be displayed.  Parameter errors cause display of error 
  137.        messages and program abort.  If errors occur, the program 
  138.        terminates with an ERRORLEVEL of 99.
  139.        
  140.        
  141.        APPLICATION NOTES:
  142.        
  143.        QUES /dy /t5 /f14 /a /y1 /uPlease respond Yes or No  <Y> or n!
  144.        
  145.            Default response = YES
  146.            Timer = 5 seconds
  147.            Color = Yellow
  148.            YES Value = 1
  149.            User Supplied Prompt = "Please respond Yes or No  <Y> or n!
  150.            
  151.            If the user hits a key within 5 seconds, the response will be 
  152.            accepted.  Y produces a YES (Errorlevel=95), N produces a NO 
  153.            (Errorlevel=90), ENTER or Carriage Return (CR) defaults to 
  154.            YES.  Anything else causes a beep and the program waits for 
  155.            an acceptable entry.  If no user entry occurs within 5 
  156.            seconds, a response default of YES is generated.  The 
  157.            response accepted by the program will be displayed at the 
  158.            current cursor position.
  159.            
  160.        
  161.        
  162.        
  163.        
  164.        QUES /uPress ENTER to proceed or wait for 10 seconds./t10/dy
  165.        
  166.            Default response = YES
  167.            Timer = 10 seconds
  168.            User Supplied Prompt = Press ENTER to proceed or wait for 10 
  169.            seconds.
  170.            
  171.            In this format, QUES may be used as a simple pause with an 
  172.            automatic timeout.  The users response is not displayed and 
  173.            need not be tested.
  174.            
  175.        QUES /mmsnx /uSelect (M) Many (S) Some (N) None (X) Exit - /dx 
  176.        /f14 /t5
  177.        
  178.            Acceptable replies = M/m, S/s, N/n, X/x
  179.            Errorlevel values = M=1, S=2, N=3, X=4
  180.            Timer = 5 seconds
  181.            User Prompt = Select (M) Many (S) Some (N) None (X) Exit - 
  182.            Foreground = Bright yellow
  183.            Default value = X
  184.            
  185.            Using the /m parameter, up to 9 user selected characters can 
  186.            be used for the reply.  Responses outside the defined set 
  187.            will cause a beep and the program waits for a correct 
  188.            response.
  189.        
  190.        A test file TEST.BAT is included to show how QUES may be used and 
  191.        the output tested.
  192.        
  193.        
  194.        
  195.        
  196.        
  197.        REVISION HISTORY:
  198.        
  199.        Ver 1.0 (Apr 1987)
  200.          - Initial release
  201.        
  202.        Ver 1.5 (Dec 1990)
  203.          - Added countdown timer to continue automatically without user 
  204.            response.
  205.        
  206.        Ver 2.0 (Jan 1991)
  207.          - Replaced positional parameters with DOS style "/" switches.
  208.          - Added /p for automatic prompting.
  209.          - Added /a to allow display/non-display of user reply
  210.          - Added /c to allow selection of foreground color of text 
  211.            written to screen.
  212.          - Added /y to allow selection of output ERRORLEVEL.
  213.        
  214.        Ver 2.1 (Jan 1991)
  215.          - Changed name from ASK to QUES to avoid conflict with other 
  216.            programs
  217.          - Added /f for foreground text color
  218.          - Added /b for background text color
  219.          - Allow user to set YES/NO ERRORLEVEL to any value in range 
  220.            0-89.
  221.          - Added /l to insert line feeds before user text displays
  222.          - Added /n to set ERRORLEVEL value for NO
  223.          - Added /r to allow user to input response as a numeric value 
  224.            from 1-9
  225.          - Deleted /p as unnecessary
  226.          - Deleted /c as unnecessary
  227.        
  228.        Ver 2.2 (Feb 90)
  229.          - Added /m parameter for user selectable reply choices
  230.        
  231.        
  232.        
  233.        PROGRAM INFORMATION:
  234.        
  235.        QUES is written and copyrighted by Logan M. Lewis, and all rights 
  236.        are reserved.  It is distributed free of charge meaning you may 
  237.        use and distribute the program with no requirement for payment to 
  238.        the author; however, the program must be distributed with all 
  239.        original files and documentation intact and unmodified.
  240.        
  241.        The software is distributed as is.  The author neither assumes 
  242.        nor accepts any liability for the performance or behavior of the 
  243.        program under any circumstances.
  244.        
  245.        Comments may be left for Monty Lewis on the following BBSs:
  246.          The Break/East BBS, (703) 680-9269, or
  247.          The Pitt BBS, (703) 335-2925
  248.          
  249.        QUES is written in Borland's Turbo Pascal 4.0.
  250.